package com.yanqu.road.entity.activity.peakseacraft;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.DataStatus;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
 * @Description 海上争霸之南海丝路 游戏服 玩家数据
 */
@FieldTypeAnnotation(tableName = "t_u_activity_peak_seacraft_user")
public class PeakSeacraftUserData extends DataObject {
    @FieldTypeAnnotation(desc = "活动id", select = true, update = true)
    private int activityId;
    @FieldTypeAnnotation(desc = "玩家id", select = true, update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "刷新轮次")
    private int round;
    @FieldTypeAnnotation(desc = "玩家自己的捐献累计经验")
    private int donationExp;
    @FieldTypeAnnotation(desc = "银两捐献次数,每轮重置")
    private int silverDonateNum;
    @FieldTypeAnnotation(desc = "宝库格子数据")
    private List<PeakSeacraftCellInfo> cellInfoList = new ArrayList<>();
    @FieldTypeAnnotation(desc = "当前层数")
    private int floor;
    @FieldTypeAnnotation(desc = "是否通关过 0否 1 是")
    private int gotBigReward;
    @FieldTypeAnnotation(desc = "是否膜拜过 0否 1 是")
    private int worship;

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        if (this.activityId != activityId) {
            this.activityId = activityId;
            setOp(DataStatus.Update);
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if (this.userId != userId) {
            this.userId = userId;
            setOp(DataStatus.Update);
        }
    }


    public int getRound() {
        return round;
    }

    public void setRound(int round) {
        if (this.round != round) {
            this.round = round;
            setOp(DataStatus.Update);
        }
    }

    public List<PeakSeacraftCellInfo> getCellInfoList() {
        return cellInfoList;
    }

    public void setCellInfoList(List<PeakSeacraftCellInfo> cellInfoList) {
        if (null == cellInfoList) {
            return;
        }
        if (this.cellInfoList == null || !this.cellInfoList.equals(cellInfoList)) {
            this.cellInfoList = cellInfoList;
            setOp(DataStatus.Update);
        }
    }

    public void addCellInfoList(PeakSeacraftCellInfo cellInfo) {
        cellInfoList.add(cellInfo);
        setUpdateOption();
    }

    public int getFloor() {
        return floor;
    }

    public void setFloor(int floor) {
        if (this.floor != floor) {
            this.floor = floor;
            setOp(DataStatus.Update);
        }
    }


    public int getGotBigReward() {
        return gotBigReward;
    }

    public void setGotBigReward(int gotBigReward) {
        if (this.gotBigReward != gotBigReward) {
            this.gotBigReward = gotBigReward;
            setOp(DataStatus.Update);
        }
    }

    public int getDonationExp() {
        return donationExp;
    }

    public void setDonationExp(int donationExp) {
        if (this.donationExp != donationExp) {
            this.donationExp = donationExp;
            setUpdateOption();
        }
    }

    public int getSilverDonateNum() {
        return silverDonateNum;
    }

    public void setSilverDonateNum(int silverDonateNum) {
        if (this.silverDonateNum != silverDonateNum) {
            this.silverDonateNum = silverDonateNum;
            setUpdateOption();
        }
    }

    public int getWorship() {
        return worship;
    }

    public void setWorship(int worship) {
        if (this.worship != worship) {
            this.worship = worship;
            setUpdateOption();
        }
    }
}
